package com.voute.Model.Impl;


import com.voute.Api.SearchService;
import com.voute.Model.Bean.HotWordsBean;
import com.voute.Model.Bean.SearchResultBean;
import com.voute.Model.ISearchModel;
import com.voute.Utils.ServiceFactory;

import java.util.HashMap;

import rx.Observable;

/**
 * 搜索相关的接口
 * Created by liukanshan on 2016/12/23.
 */

public class SearchImpl implements ISearchModel {
    @Override
    public Observable<HotWordsBean> getHotWords() {
        return ServiceFactory.GetInstance().createService(SearchService.class).getHotWords();
    }

    @Override
    public Observable<SearchResultBean> getSearchResults(HashMap<String, String> values) {
        return ServiceFactory.GetInstance().createService(SearchService.class).getSearchResults(values);
    }

    @Override
    public Observable<SearchResultBean> getRecommandSearch(String q) {
        return ServiceFactory.GetInstance().createService(SearchService.class).getRecommandSearch(q);
    }
}
